How to Onboard a Clinic
Onboarding a clinic involves various processes and is relevant to demo activities which are carried out on Bookadoc between providers/agents and patients. It involves how a business is added to Bookadoc and their provider/agent information for either successful booking, rescheduling or canceling of appointments by patients.
How to onboard a clinic
To onboard a clinic from EMR to Bookadoc involves the following steps:
Step 1: Create a new business
Use the following api endpoint to create a new business:
API Endpoint
POST /api/v1/business/register
Request Payload
{
"business_name": "Business Name",
"business_email": "testemail@business.com",
"business_npi_license": "12332123",
"business_address": "Address",
"business_city": "City",
"business_state": "State",
"business_zip_code": "4567890",
"business_phone_area_code": "777",
"business_phone_number": "234434543",
"business_fax_number": "234333",
"business_website": "https://website.example",
"business_emr": "Tebra",
"admin_first_name": "Admin-Firstname",
"admin_last_name": "Admin-Lastname",
"admin_email": "testemail2@business.com",
"admin_password": "Password@123",
"admin_password_confirmation": "Password@123",
"admin_agent_type": 1,
"admin_phone_number": "+14254548191",
"suite": "Suite C",
"enable_selfpay": true,
"emr_practice_id": 12345,
"license": "1233445",
"account_status_id": 1,
"tax_id": "1235467"
}
If the response returns 201 status code and json data, like so:
Response Example
{
"auth": {
"id": 164,
"type": "Bearer",
"name": "Admin-Firstname Admin-Lastname",
"email": "testemail2@business.com",
"created_at": "2025-04-03T11:21:56.022Z",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ0.eyJpZCI6MTY0LCJuYW1lIjoiVWdvbm5hIEV6ZW1hIiwiZW1haWwiOiJ1Z29lemU3QGFsZXRoaWFuLmNvbSIsImlhdCI6MTc0Mjk5NDA1NiwiZXhwIjoxNzQzMDE1NjU2fZ.gjtjHDhVmVspWwP9Z_Mtva_QB35C_FMJT-Qr5f3vV2f",
"token_expires": 1743015656433
},
"message": "Business Registered Successful, Kindly check your provided admin email for verification code.",
"status": "success"
}
Take record of the id value within the auth property, you will need it to create a business location if it does not get created automatically.
Step 2: Create a business location of a business
Use the following to create a business location of a business if for some reason the business is not attached to a business location:
API Endpoint
POST /api/v1/business/onboarding/steptwo
Request Payload
{
"name": "Business Name",
"suite": "Suite C",
"address": "163 16TH AVE NE",
"city": "Bellevue",
"state": "WA",
"country": "United States of America",
"zip_code": "98014",
"website": "https://website.example",
"phone_number": "+14254548191",
"state_license": "",
"phone_area_code": "777",
"emr_servicelocation_id": null,
"default_location": 1,
"timezone": "UTC",
"fax_number": "4567890",
"business_id": 164
}
Insert the id you recorded into the value for the business_id property within the payload. If the response returns 201 status code and json data like so:
Response Example
{
"message": "Business Location Created successfully.",
"data": {
"operation_hours": null,
"full_address": "163 16TH AVE NE Suite C, Bellevue, WA 98014",
"id": 3,
"name": "Business Name",
"state_license": "",
"email": null,
"address": "163 16TH AVE NE",
"suite": "Suite C",
"city": "Bellevue",
"state": "WA",
"country": "United States of America",
"zip_code": "98014",
"phone_area_code": "777",
"phone_number": "+16822534774",
"emr_servicelocation_id": null,
"default_location": true,
"timezone": "UTC",
"fax_number": "4567890",
"website": "https://website.example",
"status": null,
"created_at": "2025-03-24T15:25:14.000Z",
"updated_at": "2025-03-24T15:25:14.000Z",
"business_id": 164
}
}
Take record of the id value within the data property of the response returned. You will need it to add an agent.
Step 3: Add an agent/provider
Use the following api endpoint to add an agent to a business location:
API Endpoint
POST /api/v1/agent
Request Payload
{
"agent_type_id": 11,
"first_name": "Admin-Firstname",
"last_name": "Admin-Lastname",
"middle_name": "Admin-Middlename",
"gender": "Male",
"patient_accepted": "Both",
"phone_number": [
{
"type": "Work",
"number": "+14254548191"
}
],
"email": "testemail2@business.com",
"agent_specialty_id": 4,
"npi_license": "1689610905",
"affiliate_location": [3],
"image_url": "https://dev-api.bookadoc.com/cms/provider-images/de210368-9622-4654-b8c7-a7f24673cb00.avif",
"business_id": 164,
"zip_code": 987654,
"taxonomy_codes": "12345, 67890",
"ssn": "12345678",
"social_platform": "Facebook",
"social_id": "@admin_social_id"
}
Insert the id you recorded from creating a business location within an array into the affiliate_location property. Also add the id from creating a business into the business_id property. If the response returns 201 status code and json data like so:
Response Example
{
"message": "Admin-Firstname Admin-Lastname added Successfully.",
"data": {
"role": null,
"display_name": "Admin-Firstname Admin-Lastname",
"id": 23,
"agent_type_id": 11,
"first_name": "Admin-Firstname",
"last_name": "Admin-Lastname",
"middle_name": "Admin-Middlename",
"gender": "Male",
"patient_accepted": "Both",
"email": "testemail2@business.com",
"agent_specialty_id": 4,
"npi_license": "1689610905",
"password": "$2a$10$8Y0Hi1x4UG7sjRSQq0YWqeoO8ydL3DBP/3PSvXwMDXa3XwBcMrdtO",
"image_url": "https://dev-api.bookadoc.com/cms/provider-images/ de210368-9622-4654-b8c7-a7f24673cb00.avif",
"email_verified_at": "2025-03-24T09:46:41.000Z",
"namespace": "alethian",
"zip_code": 987654,
"taxonomy_codes": "12345, 67890",
"ssn": "12345678",
"social_platform": "Facebook",
"social_id": "@admin_social_id",
"updated_at": "2025-03-24T16:46:41.793Z",
"created_at": "2025-03-24T16:46:41.793Z"
}
}
Take record of the id return within the data property, that is the agent id and it will play an important role later on during this process.This request would also insert an entry for the agent business affiliation location automatically.
Step 4: Seed EMR Credentials
Use the following api endpoints to seed EMR credentials of a business:
API Endpoint
POST /api/v1/seed-emr-cred
Request Payload
[
{
"practice_id": 2,
"practice_name": "Business Name",
"type": "tebra",
"business_location_id": 3,
"credentials": [
{
"type": "user",
"user": "testemail2@business.com",
"password": "Password@123",
"customer_key": "customer-key"
},
{
"type": "user",
"user": "testemail3@business.com",
"password": "Password@1234",
"customer_key": "customer-key"
}
]
}
]
Step 5: Add Agent Working Hours
Use the following api endpoint to an agent's working hours:
API Endpoint
POST /api/v1/agent/:agent_id/working-hours
Example Request
POST /api/v1/agent/23/working-hours
Request Payload
[
{
"day_of_week": "Monday",
"start_time": "09:00:00",
"end_time": "17:00:00",
"duration": 30,
"new_patient_duration": 30,
"launch_starts": "12:00:00",
"launch_ends": "13:00:00",
"business_location_id": 3
},
{
"day_of_week": "Tuesday",
"start_time": "09:00:00",
"end_time": "17:00:00",
"duration": 30,
"new_patient_duration": 30,
"launch_starts": "12:00:00",
"launch_ends": "13:00:00",
"business_location_id": 3
},
{
"day_of_week": "Wednesday",
"start_time": "09:00:00",
"end_time": "17:00:00",
"duration": 30,
"new_patient_duration": 30,
"launch_starts": "12:00:00",
"launch_ends": "13:00:00",
"business_location_id": 3
},
{
"day_of_week": "Thursday",
"start_time": "09:00:00",
"end_time": "17:00:00",
"duration": 30,
"new_patient_duration": 30,
"launch_starts": "12:00:00",
"launch_ends": "13:00:00",
"business_location_id": 2
},
{
"day_of_week": "Friday",
"start_time": "09:00:00",
"end_time": "17:00:00",
"duration": 30,
"new_patient_duration": 30,
"launch_starts": "12:00:00",
"launch_ends": "13:00:00",
"business_location_id": 2
}
]
Step 6: Add agent Off Hours
Use the following api endpoint to add agent off hours:
API Endpoint
POST /api/v1/agent/set-time-off
Request Payload
{
"agentIds": [23],
"start_date": "2025-01-27",
"end_date": "2025-02-17"
}
Step 7: Availability Job Sync
Wait for an availability job to sync agent’s/provider’s timeslots.
Step 8: Semantic Search
Next, would be to get the agent’s details to be returned with semantic search using agent id.